<template>
	<view class="address-form">
		<view class="top1 d-b-c">
			<view class="">
				反馈建议
			</view>
			<view class="" @click="handleMyComp">
				我的反馈
			</view>
		</view>
		<view class=" d-b-c p-20-0 mt20" style="background-color: #fff;padding: 20rpx ;"
			v-for="(item,index) in typelist" @click="handleComp(item)">
			<text class="key-name" style="flex: 1;"> {{ item.name}}</text>
			<view class="d-e-c">
				<text class="icon iconfont icon-jiantou"></text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				typelist: []
			}
		},
		methods: {
			getTypeList() {
				let self = this
				self._post('order.complaint/typeList', {}, function(res) {
					if (res.code == 1) {
						console.log(res.data, 'data')
						self.typelist = res.data
					}
				})
			},
			handleComp(item){
				uni.navigateTo({
					url:"/pages/user/custComp/index?id=" + item.id
				})
			},
			handleMyComp(){
				uni.navigateTo({
					url:"/pages/user/custComp/plantlist"
				})
			}
		},
		onShow() {
			this.getTypeList()
		}
	}
</script>

<style lang="scss" scoped>
	.top1 {
		color: #2F3131;
		font-size: 28rpx;
		padding: 10rpx 20rpx;
	}
</style>